package com.shr.code_interview;

public class Solution_61 {
    public boolean isContinuous(int [] numbers) {
    	if(numbers.length==0) return false;
        int[] table = new int[14];
        for(int i = 0;i<numbers.length;i++){
        	table[numbers[i]] += 1; 
        }
        int zeroCount = table[0];
        int i = 1;
        while(table[i] == 0)
        	i++;
        int j = 13;
        while(table[j] == 0)
        	j--;
        int blankCount = 0;
        for(int k = i; k <= j; k++){
        	if(table[k] > 1)
        		return false ;
        	else if(table[k] == 0)
        		blankCount ++ ;
        }
        if(blankCount <= zeroCount)
        	return true;
        else return false;
    }	
}
